<template>
<div class="am-form-header">
  <div class="title-container">{{ title }}</div>
  <div class="actions">
    <slot>
      <el-button type="primary" size="mini" @click="$emit('submit')">保存</el-button>
      <el-button plain size="mini" @click="$emit('cancel')">取消</el-button>
    </slot>
  </div>
</div>
</template>

<script>
export default {
  props: {
    title: String
  }
}
</script>

<style lang="scss" scoped>
.am-form-header{
  display: flex;
  align-items: center;
  .title-container{
    flex: 1;
  }
}
</style>
